Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 0x swap data #59

Merged

Conversation

janndriessen
Copy link
Collaborator

@janndriessen janndriessen commented May 24, 2024

  • Adds swap quote provider protocol for all quote providers
  • Refactor the use of getting leverage token data from one utility function

Closes #58

@@ -71,14 +70,13 @@ export class FlashMintQuoteProvider
{
constructor(
private readonly provider: JsonRpcProvider,
private readonly swapQuoteProvider?: SwapQuoteProvider,
private readonly zeroExApiV1?: ZeroExApi
private readonly swapQuoteProvider: SwapQuoteProvider
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • adds swapQuoteProvider as required dependency
  • removes zeroExApiV1 as dependency

if (contractType === FlashMintContractType.leveraged) return true
if (contractType === FlashMintContractType.leveragedExtended) return true
return false
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obsolete as the swap quote provider is always required

@janndriessen janndriessen marked this pull request as ready for review May 24, 2024 12:13
@janndriessen janndriessen merged commit 0b9f943 into feat/add-swap-quote-provider-protocol May 24, 2024
1 check failed
@janndriessen janndriessen deleted the feat/add-0x-swap-data branch May 24, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants